//Sun 31 Jan 2010 06:22:26 PM CST 
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int cost[100001];

int main()
{
	int n, q, s;
	cin >> n >> q >> s;
	for(int i=0; i+1<n; i++)
	{
		int a,b,c;
		cin >> a >> b >> c;
		cost[a][b] = c;
		cost[b][a] = c; 
	}
	
}
